package cn.wolfcode.rbac.service.impl;

import cn.wolfcode.rbac.domain.CustomerTraceHistory;
import cn.wolfcode.rbac.mapper.CustomerReportMapper;
import cn.wolfcode.rbac.query.CustomerReportQuery;
import cn.wolfcode.rbac.service.ICustomerReportService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
@Transactional
public class CustomerReportServiceImpl implements ICustomerReportService {
    @Autowired
    private CustomerReportMapper customerReportMapper;

    @Override
    public PageInfo selectCustomerReport(CustomerReportQuery qo) {
        PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
        List<Map> list = customerReportMapper.selectCustomerRepost(qo);
        return new PageInfo(list);
    }
}
